package com.gm.commonlib.network.basenetwork.numberformat;

public class OriginalLong extends Number implements Comparable<Long> {
    Long integer;

    public OriginalLong(Long integer) {
        this.integer = integer;
    }

    @Override
    public int compareTo(Long o) {
        if(integer != null) {
            return integer.compareTo(o);
        }
        return 0;
    }

    @Override
    public int intValue() {
        if(integer != null) {
            return integer.intValue();
        }
        return 0;
    }

    @Override
    public long longValue() {
        if(integer != null) {
            return integer;
        }
        return 0;
    }

    @Override
    public float floatValue() {
        if(integer != null) {
            return integer.floatValue();
        }
        return 0;
    }

    @Override
    public double doubleValue() {
        if(integer != null) {
            return integer.doubleValue();
        }
        return 0;
    }
}
